package com.palm.hubo2o.network;

import com.google.gson.annotations.Expose;
import com.palm.hubo2o.BuildConfig;
import com.palm.palmutils.TimeUtils;

/**
 * Created by wongqi on 16/6/7.
 */
public class Request<T> {
    @Expose
    private String client;
    @Expose
    private String version;
    @Expose
    private String time;
    @Expose
    private String stationId;
    @Expose
    private String userId;
    @Expose
    private String sessionId;
    @Expose
    private T body;

    public Request() {
        client = "android";
        version = String.valueOf(BuildConfig.VERSION_CODE);
        time = TimeUtils.formatTime("yyyyMMddHHmmss", System.currentTimeMillis());
        PalmSession.wrapRequest(this);
    }

    public Request(T body) {
        this();
        this.body = body;
    }

    public String getClient() {
        return client;
    }

    public void setClient(String client) {
        this.client = client;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }
}
